package com.springvn.sample.persistence;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "employees")
public class Employee2 implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "EMP_NO")
	private Integer id;
	
	@Column(name = "BIRTH_DAY")
	private Date birthDay;
	
	@Column(name = "FIRST_NAME")
	private String firstname;
	
	@Column(name = "LAST_NAME")
	private String lastname;

	@Column(name = "GENDER", columnDefinition="enum('M','F')")
	private String gender;
	
	@Column(name = "HIRE_DATE")
	private Date hireDate;

	
	public Employee2() {

	}

	/**
	 * @param id
	 * @param firstname
	 * @param lastname
	 * @param birthDay
	 * @param gender
	 * @param hireDate
	 */
	public Employee2(Integer id, String firstname, String lastname,
			Date birthDay, String gender, Date hireDate) {
		this.id = id;
		this.firstname = firstname;
		this.lastname = lastname;
		this.birthDay = birthDay;
		this.gender = gender;
		this.hireDate = hireDate;
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the firstname
	 */
	public String getFirstname() {
		return firstname;
	}

	/**
	 * @param firstname
	 *            the firstname to set
	 */
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	/**
	 * @return the lastname
	 */
	public String getLastname() {
		return lastname;
	}

	/**
	 * @param lastname
	 *            the lastname to set
	 */
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	/**
	 * @return the birthDay
	 */
	public Date getBirthDay() {
		return birthDay;
	}

	/**
	 * @param birthDay
	 *            the birthDay to set
	 */
	public void setBirthDay(Date birthDay) {
		this.birthDay = birthDay;
	}

	/**
	 * @return the gender
	 */
	public String getGender() {
		return gender;
	}

	/**
	 * @param gender
	 *            the gender to set
	 */
	public void setGender(String gender) {
		this.gender = gender;
	}

	/**
	 * @return the hireDate
	 */
	public Date getHireDate() {
		return hireDate;
	}

	/**
	 * @param hireDate
	 *            the hireDate to set
	 */
	public void setHireDate(Date hireDate) {
		this.hireDate = hireDate;
	}

}
